<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <title>排刀</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <link rel="stylesheet" href="../css/style.css">

</head>
<body>
<div>
    <ul class="layui-nav">
        <li class="layui-nav-item"><a href="/pd.html">排刀功能</a></li>
        <li class="layui-nav-item layui-this"><a href="/Lineup.html">轴资料</a></li>
        <li class="layui-nav-item"><a href="/Box.html">box资料</a></li>
        <li class="layui-nav-item"><a href="/param.html">参数设置</a></li>
    </ul>
</div>
<div>
    <ul class="layui-nav">
    </ul>
</div>
<div class="demoTable" style="margin-top: 20px;text-align: right;">
    <button class="layui-btn" id="excelImportLineup">excel导入阵容</button>
</div>

<table class="layui-hide" id="test" lay-filter="test"></table>

<script src="layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script src="./js/mainmenu.js" charset="utf-8"></script>
<script>
    layui.use(['table','jquery'], function(){
        var table = layui.table;
        var $ = layui.jquery;

        table.render({
            elem: '#test'
            ,url:'/pd/2.getAllLineup'
            ,title: '阵容表'
            ,headers:{ token: window.sessionStorage.getItem('token') }
            ,cols: [[
                {field:'id', title:'ID', fixed: 'left', unresize: true, sort: true, hide:true}
                ,{field:'bossNo', title:'BOSS编号', width:'20%'}
                ,{field:'remark', title:'名称', width:'20%'}
                ,{field:'damage', title:'伤害', width:'20%'}
                ,{field:'lineupCardNames', title:'阵容'}
            ]]
            ,id: 'testReload'
        });
        $('#excelImportLineup').on('click', function(){
            layui.layer.open({
                type: 2,
                title: '导入阵容',
                shadeClose: true,
                shade: 0.8,
                area: ['600px', '80%'],
                content: '/importLineup.html' //iframe的url
            });
        });
    });
</script>

</body>
</html>